﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Principal;

namespace MyNote.Data.Models
{
    public partial class Note
    {
        public Note()
        {
            Id = Guid.NewGuid();
            CreatedDate = DateTime.Now;
        }
        
        protected override void OnPropertyChanged(string property)
        {
            base.OnPropertyChanged(property);

            switch (property)
            {
                case "Description":
                case "Owner":
                case "Tag":
                case "IsRead":
                    LastModified = DateTime.Now;
                    break;

                default:
                    break;
            }
        }
    }
}
